#include<stdio.h>
#include<conio.h>
#include<string.h>
// chuan hoa xau\0
int main()
{
int i; char s[255];
printf("nhap xau");
gets(s);
while (s[0]==' ') strcpy(s,s+1);
//cuoi
	while (s[strlen(s)-1]==' ') s[strlen(s)-1]='\0';
//giua ha  noi 
	for (int i=0; i<strlen(s)-1; i++)
		if (s[i]==' ' && s[i+1]==' ')
		{
			for (int j=i+1; j<strlen(s)-1; j++)
             s[j]=s[j+1];
			s[strlen(s)-1]='\0';
			i--; 
		}
printf("xau da chuan hoa :%s",s);
getch();
}
